/*
 * Copyright (c) 2021 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef SWANLINK_FINANCE_MAKECARD_SERVICES_ZIDL_INCLUDE_MAKECARD_SRV_PROXY_H
#define SWANLINK_FINANCE_MAKECARD_SERVICES_ZIDL_INCLUDE_MAKECARD_SRV_PROXY_H

#include <securec.h>
#include "imakecard_srv.h"
#include "nocopyable.h"
#include "iremote_proxy.h"
#include "cashdevice_proxy.h"

namespace SwanLink {
namespace Finance {
class MakecardSrvProxy : public IRemoteProxy<IMakecardSrv>, public  CashDeviceSrvProxy {
 public:
    explicit MakecardSrvProxy(const sptr<IRemoteObject>& impl)
        : IRemoteProxy<IMakecardSrv>(impl),
        CashDeviceSrvProxy(impl, MakecardSrvProxy::GetDescriptor()) {}
    ~MakecardSrvProxy() = default;
    DISALLOW_COPY_AND_MOVE(MakecardSrvProxy);
    COMMON_FUNC_DEFINE(CashDeviceSrvProxy)
    /**
     * 设置打印机配置
     */
    int SetConfig(int handle, int configType, int configValue) override;
    /**
     * 设置standby参数
     */
    int SetStandbyParam(int handle, int dir, int pos, int standbyTime) override;
    /**
     * 打印卡片
     */
    int PrintCard(int handle, BmpInfo cardBmpInfo) override;
    /**
     * 获取打印机信息
     */
    int GetDeviceInfo(int handle, int infoType, char *infoValue) override;
    /**
     * 获取错误信息
     */
    int GetErrorString(int handle, int status, char* statusDesc) override;
    /**
     * 传动卡片到指定位置
     */
    int MoveCard(int handle, int postionMoveTo) override;
    /**
     * 翻转卡片
     */
    int FlipCard(int handle) override;

 private:
    static inline BrokerDelegator<MakecardSrvProxy> delegator_;
};
}  // namespace Finance
}  // namespace SwanLink

#endif  // SWANLINK_FINANCE_MAKECARD_SERVICES_ZIDL_INCLUDE_MAKECARD_SRV_PROXY_H
